package com.dimples.dd.system.convert;

import com.dimples.dd.common.pojo.PageResult;
import com.dimples.dd.system.model.entity.SystemDictDataDO;
import com.dimples.dd.system.model.form.DictForm;
import com.dimples.dd.system.model.vo.DictDataSimpleRespVO;
import com.dimples.dd.system.model.vo.DictPageVO;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * 字典对象转换器
 *
 * @author zhongyj <1126834403@qq.com><br/>
 * @date 2024/7/22
 */
@Mapper(componentModel = "spring")
public interface DictConverter {

    PageResult<DictPageVO> entity2Page(PageResult<SystemDictDataDO> dictDataPage);

    DictForm entity2Form(SystemDictDataDO entity);

    SystemDictDataDO form2Entity(DictForm dictForm);

    List<DictDataSimpleRespVO> entity2Vo(List<SystemDictDataDO> list);

    List<DictDataSimpleRespVO.DictData> entity2DataList(List<SystemDictDataDO> systemDictData);

    DictDataSimpleRespVO.DictData entity2Data(SystemDictDataDO systemDictData);
}

